<?php


namespace App\Department\Extensions\Nav;


use App\Extensions\NavBar\AbstractNavBar;
use Encore\Admin\Facades\Admin;


class NavHeader extends AbstractNavBar
{

    function data(): array
    {
        $data = [];
        $user = Admin::user();
        if ($todo = $this->navbarService()->todo($user, 2)) {
            $data[] = $this->groupData('我的待办', $todo);
        }
        return $data;
    }

}
